package com.android.jingweiapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by cuiwenrui-pc on 15/11/14.
 */
public class MailListBean implements Parcelable {
    /**
     * id : 1034
     * state : 已回复
     * title : 查证一家P2P企业是否具有资质
     * time : 2015-06-30
     * phoneNumber : 15391142989
     */

    private List<DataEntity> data;

    public void setData(List<DataEntity> data) {
        this.data = data;
    }

    public List<DataEntity> getData() {
        return data;
    }

    public static class DataEntity implements Parcelable {
        private String id;
        private String state;
        private String title;
        private String time;
        private String phoneNumber;

        public void setId(String id) {
            this.id = id;
        }

        public void setState(String state) {
            this.state = state;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public void setPhoneNumber(String phoneNumber) {
            this.phoneNumber = phoneNumber;
        }

        public String getId() {
            return id;
        }

        public String getState() {
            return state;
        }

        public String getTitle() {
            return title;
        }

        public String getTime() {
            return time;
        }

        public String getPhoneNumber() {
            return phoneNumber;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.state);
            dest.writeString(this.title);
            dest.writeString(this.time);
            dest.writeString(this.phoneNumber);
        }

        public DataEntity() {
        }

        protected DataEntity(Parcel in) {
            this.id = in.readString();
            this.state = in.readString();
            this.title = in.readString();
            this.time = in.readString();
            this.phoneNumber = in.readString();
        }

        public static final Creator<DataEntity> CREATOR = new Creator<DataEntity>() {
            public DataEntity createFromParcel(Parcel source) {
                return new DataEntity(source);
            }

            public DataEntity[] newArray(int size) {
                return new DataEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.data);
    }

    public MailListBean() {
    }

    protected MailListBean(Parcel in) {
        this.data = new ArrayList<DataEntity>();
        in.readList(this.data, List.class.getClassLoader());
    }

    public static final Parcelable.Creator<MailListBean> CREATOR = new Parcelable.Creator<MailListBean>() {
        public MailListBean createFromParcel(Parcel source) {
            return new MailListBean(source);
        }

        public MailListBean[] newArray(int size) {
            return new MailListBean[size];
        }
    };
}
